#ifndef SERVER_LINK_H
#define SERVER_LINK_H

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "../chat.h"

//在线用户节点信息
typedef struct OnlineNode
{
	char id[32];		//用户ID
	int fd;			//连接套接字
	int forbid_flag;	//禁言标志位
	int admin_flag;		//管理员标志位
	int status;		//在线状态
	struct OnlineNode *next;
}Online;

int InitLink(Online *head);
int InsertLink(Online *head, int place, Online *element);
int TraverseLink(Online *head);
Online *GetNodeFromID(Online *head, char *user);
int DeleteNodeFromID(Online *head, char *user);

#endif
